package com.itheima.demo02;

public class Teacher {

    private String name;//姓名: name
    private int age;//年龄: age
    private String content;// 讲课内容: content

    //getXxx()和setXxx()
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    //构造方法, 空参
    public Teacher() {
    }

    //构造方法, 全参.
    public Teacher(String name, int age, String content) {
        this.name = name;
        this.age = age;
        this.content = content;
    }

    //吃饭: eat()
    public void eat() {
        System.out.println("年龄为" + getAge() + "的" + getName() + "老师正在吃饭....");
    }

    //讲课: teach() Java基础中面向对象的知识........
    public void teach() {
        System.out.println("年龄为" + getAge() + "的" + getName() + "正在亢奋的讲着" + getContent());
    }

}
